<script setup>
import Probe from "./Probe.vue";
import {onBeforeMount, reactive} from "vue";
const props = defineProps({
  container: {
    type: Object,
  },
  containerIndex: {
    type: Number,
  },
  containerType: {
    type: String,
  }
})
onBeforeMount(()=>{
  // // 检查是否有startupProbe这个字段
  // if (props.container.hasOwnProperty('startupProbe')) {
  //   props.container['startupProbe'] = {
  //     initialDelaySeconds: 30,
  //   }
  // }
})
// 更改检查方式的回调函数
// const probeChangeRollback=(probeType)=>{
//   props.
// }

</script>
  <template>
      <!-- startup -->
    <Probe :container-type="props.containerType"  :container-index="props.containerIndex" :probe="props.container.startupProbe" probe-type="startupProbe" title="启动探针(StartupProbe)" @probe-changed-rollback="(value)=>{props.container.startupProbe=value}"></Probe>
    <Probe :container-type="props.containerType"  :container-index="props.containerIndex" style="margin-top: 10px" :probe="props.container.livenessProbe" probe-type="livenessProbe" title="存活探针(LivenessProbe)" @probe-changed-rollback="(value)=>{props.container.livenessProbe=value}"></Probe>
    <Probe :container-type="props.containerType"  :container-index="props.containerIndex" style="margin-top: 10px" :probe="props.container.readinessProbe" probe-type="readinessProbe" title="就绪探针(ReadinessProbe)" @probe-changed-rollback="(value)=>{props.container.readinessProbe=value}"></Probe>
  </template>
<style scoped>

</style>